<?php

Raise::load('core.RaiseValidator');

/**
 * RaiseRequiredFieldValidator class
 * validates and makes sure that the value is set / not empty / not null
 *
 * @author Sam-Mauris Yong / hellclanner at live dot com
 * @license http://www.opensource.org/licenses/bsd-license New BSD License
 * @package phpraise.core.validator
 * @since 1.2
 */
class RaiseRequiredFieldValidator extends RaiseValidator {

    public function validate($value) {
        parent::validate($value);
        if(!$value){
            $this->isValid = false;
        }
        $this->isValid = true;
    }

}
